export default () => {
    let agentSign = window.navigator.userAgent;
    let devicePlatform = "PC";
    let operateSystem = "Windows";
    if (agentSign.indexOf("Android") != -1) {
        devicePlatform = "Mobile";
        operateSystem = "Android";
    } else if (agentSign.indexOf("iPhone") != -1) {
        devicePlatform = "Mobile";
        operateSystem = "iPhone";
    } else if (agentSign.indexOf("iPad") != -1) {
        devicePlatform = "Pad";
        operateSystem = "iPad";
    } else {
        if (agentSign.indexOf("Mac") != -1) {
            operateSystem = "Mac";
        } else if (agentSign.indexOf("Linux") != -1) {
            operateSystem = "Linux";
        }
    }
    return {
        devicePlatform,
        operateSystem
    }
}